package com.hcy.orderclient;

import com.hcy.ordermodel.dto.request.*;
import com.hcy.rabbitbasicmodel.dto.HomeData;
import com.hcy.ordermodel.dto.response.OrderInfoResponseDTO;
import com.hcy.ordermodel.dto.response.PayOrderResponseDTO;
import com.hcy.ordermodel.dto.response.SimpleOrderResponseDTO;
import com.hcy.rabbitbasicmodel.dto.MyPage;
import com.hcy.rabbitbasicmodel.model.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author huchenying
 * @Description
 * @Date 2022/3/24 14:49
 */
@FeignClient(name = "order-service-api")
public interface OrderBaseClient {
    @PostMapping("/customer/upDateOriginPoint")
    ResponseData<SimpleOrderResponseDTO> upDateOriginPoint(@Validated @RequestBody UpdateOrderOriginPointRequestDTO requestDTO);
    @PostMapping("/driver/computerOrder")
    ResponseData<OrderInfoResponseDTO> computerOrder(@Validated @RequestBody DriveComputerOrderRequestDTO requestDTO);
    @PostMapping("/driver/getPayOrder")
    ResponseData<PayOrderResponseDTO> getPayOrder(@Validated @RequestBody PayOrderRequestDTO requestDTO);
    @PostMapping("/driver/getNoPayOrder")
    ResponseData<PayOrderResponseDTO> getNoPayOrder(@RequestBody PayOrderRequestDTO requestDTO);
    @PostMapping("/customer/payOrderByCoin")
    ResponseData<SimpleOrderResponseDTO> payOrderByCoin(@Validated @RequestBody PayOrderRequestDTO requestDTO);
    @PostMapping("/customer/getOrderList")
    ResponseData<List<SimpleOrderResponseDTO>> getOrderList(@Validated @RequestBody CustomerOrderListRequestDTO requestDTO);
    @PostMapping("/customer/cancelOrder")
    ResponseData<SimpleOrderResponseDTO> customerCancelOrder(@Validated @RequestBody CancelOrderRequestDTO requestDTO);
    @PostMapping("/manager/getServerOrderList")
    ResponseData<MyPage<SimpleOrderResponseDTO>> getServerOrderList(@Validated @RequestBody ManagerOrderRequestDTO requestDTO);
    @PostMapping("/manager/getPayOrderList")
    ResponseData<MyPage<SimplePayOrderResponseDTO>> getPayOrderList(@Validated @RequestBody ManagerPayOrderRequestDTO requestDTO);
    @PostMapping("/homeData/getHomeData")
    ResponseData<List<HomeData>> getHomeData();
}
